import Taro from '@tarojs/taro';
import { useLoad } from '@tarojs/taro';
import { View, Text, Image } from '@tarojs/components';
import Navigation from '@/components/Navigation';
import PhoneRegister from './components/PhoneRegister';
import cssModule from './index.module.scss';

/**
 * @description 登录
 * author Shawn
 */

export default function Login() {
    useLoad(() => {
        console.log('Page loaded.');
    });

    const onVipStatement = () => {
        Taro.navigateTo({
            url: '/subPackages/vipStatement/index'
        })
    }

    // 去登录
    const handleGoLogin = () => {
        Taro.navigateBack();
    }

    return (
        <View>
            {/* 自定义导航栏 */}
            <Navigation />

            {/* 页面内容 */}
            <View className={cssModule.container}>
                <View className={cssModule.logo}>
                    <View className={cssModule.logoImage}>
                        <Image src='
https://baoyouqun.cn/files/2025/11/09/91c8ae6d-4e5c-4216-a064-a702d4a1eedc.jpg' mode='aspectFill' />
                    </View>
                    <Text className={cssModule.logoDesc}>找资源？进豹友群！</Text>
                </View>
                <View className={cssModule.accountLogin}>
                    <PhoneRegister />
                </View>
                <View className={cssModule.agreement} onClick={handleGoLogin}>
                    <Text className={cssModule.link}>已有账号，立即登录</Text>
                </View>
            </View>
            <View className={cssModule.euity} onClick={onVipStatement}>
                <Text>豹子号注册要求和会员权益、请查看</Text>
            </View>
        </View>
    );
}
